<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      * {
        margin: 0;
        padding: 0;
      }
      .box {
        width: 980px;
        height: 200px;
        background-color: red;
      }
    </style>
  </head>
  <body>
    <!-- <div class="box"></div> -->

    <h1 id="tip"></h1>
    <!-- <img src="./位图/1.jpg" alt="" />
    <img src="./位图/2.jpg" alt="" />
    <img src="./位图/3.jpg" alt="" />
    <img src="./位图/4.jpg" alt="" /> -->
    <script>
      // 移动端获取布局视口: document.documentElement.clientWidth
      tip.innerText = document.documentElement.clientWidth
    </script>
  </body>
</html>
